public static void deleteAuction(int auctionId) throws SQLException, AuctionException {
        DbContext.getConnection().setTransactionIsolation(Connection.TRANSACTION_SERIALIZABLE);
        DbContext.getConnection().setAutoCommit(false);
        try {
            Auction auction = AuctionFinder.getInstance().findById(auctionId);
            if (auction == null) {
                throw new AuctionException("No such a auction.");
            }
            if (!auction.getLaunched()) {
                auction.delete();
                DbContext.getConnection().commit();
            } else {
                throw new AuctionException("Auction is launched, so you cannot delete this auction.");
            }
        } catch (SQLException e) {
            DbContext.getConnection().rollback();
            throw e;
        } finally {
            DbContext.getConnection().setAutoCommit(true);
        }
    }